import java.io.*;

public class Code3{
    public static void main(String[] args){
        Student student1 = new Student("zhang","5005180001");
        Undergraduate undergraduate1 = new Undergraduate("Li","5005180001","本科");
        student1.show();
        undergraduate1.show();
    }

}

class Student{
    public String name;
    public  String id;
    public Student(String name, String id){
        this.name = name;
        this.id  = id;
    }
    public void show(){
        System.out.println(name + " " + id);
    }
}

class Undergraduate extends Student{
    private String degree;

    public Undergraduate(String name, String id,String degree){
        super(name,id);
        this.degree = degree;
    }
    public void show(){
        System.out.println(name + " " + id + " " + degree );
    }
}